package com.srv.servlet;

import weibo4j.Weibo;
import weibo4j.http.Response;
import junit.framework.Assert;
import junit.framework.TestCase;

public class ServletTravelGetidTestCase extends TestCase {
	public ServletTravelGetidTestCase(String name){
		super(name);
	}
	//85f01aeae2a448879dc7b3bfdc26f247
	public void testValidArgument() { 	
		Weibo weibo = new Weibo();
		weibo.setToken("sdfsfsdf");
		
		Response response=null;
		String expect = "{\"r\":\"ok\",\"m\":\"15aa464160d74fe8b735096bcc31dd77\"}";		
		try{
        response = weibo.client.get(TestConfig.servlet_prefix+"/travel/getid");  
		Assert.assertEquals(expect.length(),response.getResponseAsString().length());		
		}catch(Exception e){
			e.printStackTrace();
		}		
    }
}
